using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Azuriranje : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {


    }


    protected void Button1_Click(object sender, EventArgs e)
    {
        RN_WebService servis = new RN_WebService();

        int pom = servis.checkUser(imeTextBox.Text, lozTextBox.Text);
        if (pom == 1)
        {
            poraka.Text = "There is an user name and password in the data base!";
            poraka.Visible = true;
            System.Drawing.Color clr;
            clr = System.Drawing.Color.Red;
            poraka.ForeColor = clr;
        }
        else
        {
            int pom1 = servis.enterPlayer(imeTextBox.Text, lozTextBox.Text, emailTextBox.Text);
            if (pom1 == 1)
            {
                poraka.Text = "The player is successfuly added to the database !";
                poraka.Visible = true;
                Response.Redirect("NajaviSe.aspx");
            }
            else
            {
                poraka.Text = "There is an error while creating a player!";
                poraka.Visible = true;
            }

        }
    }

}
